package com.test.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by Lenovo on 2019/1/8.
 */
@Controller
@RequestMapping("/index")
public class IndexController {

    @RequestMapping("/getIndex.do")
    public ModelAndView getIndex(Model model){
        model.addAttribute("hello", "hello test");
        ModelAndView mv = new ModelAndView("/hello");
        return mv;
    }
}
